<template>
	<view>
		{{lat}},{{lon}}
	</view>
</template>

<script>
	export default {
		data() {
			return {
				lat:'',
				lon:''
			}
		},
		methods: {
			
		},
		onLoad: function (e) {
			let that = this
			uni.getLocation({
				type: 'gcj02',
				altitude: true,	
			  success: function (e) {console.log(e)
			    var a = e.latitude,i = e.longitude
				that.lat = a,that.lon = i
				uni.openLocation({
					latitude:a,
					longitude:i
				})
			  },
			  fail: function (e) {
			   console.log(e)
			  }
			});
		}
	}
</script>

<style>

</style>
